package com.jzhao.jpre.model;

import org.springframework.dao.DataAccessException;

import com.jzhao.jpre.base.Assembler;
import com.jzhao.jpre.base.StringPublicDeal;
import com.jzhao.jpre.model.dao.MerInstDao;

public class TestMerInst {
	public static void main(String[] args){
		MerInstDao merInstDao=(MerInstDao)Assembler.getInstance("merInstDao");
		StringPublicDeal cc=(StringPublicDeal)Assembler.getInstance("stringPublicDeal");
		MerInst merInst=null;

		try{
			merInst=merInstDao.selectByMrchCode("02800003");
			System.out.println("MrchCode = " + merInst.getMrchCode());
			System.out.println("MrchType = " + merInst.getMrchType());
			System.out.println("EncMode = " + merInst.getEncMode());
			System.out.println("Status = " + merInst.getStatus());
			System.out.println("TranBeginTime = " + merInst.getTranBeginTime());
			System.out.println("TranEndTime = " + merInst.getTranEndTime());
			System.out.println("Name = " + merInst.getName());
			System.out.println("MerName = " + cc.convToGB2312(merInst.getMerName()));
			System.out.println("Tel = " + merInst.getTel());
			System.out.println("Addr = " + merInst.getAddr());
			System.out.println("Mobile = " + merInst.getMobile());
			System.out.println("Fax = " + merInst.getFax());
			System.out.println("OpenBank = " + merInst.getOpenBank());
			System.out.println("AcctNo = " + merInst.getAcctNo());
			System.out.println("Memo = " +cc.convToGB2312(merInst.getMemo()));
		}catch(DataAccessException dae){
			System.out.println("The record doesn't exist!");
			}
		}
}
